Anti-Unification with Unranked Terms and Hedges
نویسندگان
چکیده
We study anti-unification for unranked terms and hedges that may contain term and hedge variables. The anti-unification problem of two hedges s̃1 and s̃2 is concerned with finding their generalization, a hedge q̃ such that both s̃1 and s̃2 are instances of q̃ under some substitutions. Hedge variables help to fill in gaps in generalizations, while term variables abstract single (sub)terms with different top function symbols. First, we design a complete and minimal algorithm to compute least general generalizations. Then, we improve the efficiency of the algorithm by restricting possible alternatives permitted in the generalizations. The restrictions are imposed with the help of a rigidity function that is a parameter in the improved algorithm and selects certain common subsequences from the hedges to be generalized. Finally, we indicate a possible application of the algorithm in software engineering.
منابع مشابه
Unranked Anti-Unification with Hedge and Context Variables
In this work we study anti-unification for unranked terms and hedges, permitting context and hedge variables. Hedges are sequences of unranked terms. The anti-unification problem of two hedges s̃ and q̃ is concerned with finding their generalization, a hedge g̃ such that both s̃ and q̃ are instances of g̃ under some substitutions. Context variables are used to abstract vertical differences in the inp...
متن کاملUnranked Second-Order Anti-Unification
In this work we study anti-unification for unranked terms and hedges, permitting context and hedge variables. Hedges are sequences of unranked terms. The anti-unification problem of two hedges s̃ and q̃ is concerned with finding their generalization, a hedge g̃ such that both s̃ and q̃ are substitution instances of g̃. Second-order power is gained by using context variables to generalize vertical dif...
متن کاملAnti-Unification for Unranked Terms and Hedges
We study anti-unification for unranked terms and hedges that may contain term and hedge variables. The anti-unification problem of two hedges s1 and s2 is concerned with finding their generalization, a hedge q such that both s1 and s2 are instances of q under some substitutions. Hedge variables help to fill in gaps in generalizations, while term variables abstract single (sub)terms with differe...
متن کاملTerm-Graph Anti-Unification∗
We study anti-unification for possibly cyclic, unranked term-graphs and develop an algorithm, which computes a minimal complete set of least general generalizations for them. For bisimilar graphs the algorithm computes the join in the lattice generated by a functional bisimulation. Besides, we consider the case when the graph edges are not ordered (modeled by commutativity). These results gener...
متن کاملCLP(H): Constraint logic programming for hedges
CLP(H) is an instantiation of the general constraint logic programming scheme with the constraint domain of hedges. Hedges are finite sequences of unranked terms, built over variadic function symbols and three kinds of variables: for terms, for hedges, and for function symbols. Constraints involve equations between unranked terms and atoms for regular hedge language membership. We study algebra...
متن کامل